package com.alibaba.nacos.controller.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: nacos-spring-cloud-example
 * @description: 配置类
 * @author: coderChen
 * @create: 2024-10-21 21:29
 **/

@RestController
@RefreshScope
public class ConfigController {

    @Value("${coderChen.signature:机会总是留给有准备的人，努力比不努力好}")
    private String signature;

    @GetMapping("/config")
    public String getConfig() {
        return "signature: " + signature;
    }
}
